package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.PartyActivistMapper;
import com.ruoyi.system.domain.PartyActivist;
import com.ruoyi.system.service.IPartyActivistService;

/**
 * 入党积极分子申请Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-10-16
 */
@Service
public class PartyActivistServiceImpl implements IPartyActivistService 
{
    @Autowired
    private PartyActivistMapper partyActivistMapper;

    /**
     * 查询入党积极分子申请
     * 
     * @param activistId 入党积极分子申请主键
     * @return 入党积极分子申请
     */
    @Override
    public PartyActivist selectPartyActivistByActivistId(Long activistId)
    {
        return partyActivistMapper.selectPartyActivistByActivistId(activistId);
    }

    /**
     * 查询入党积极分子申请列表
     * 
     * @param partyActivist 入党积极分子申请
     * @return 入党积极分子申请
     */
    @Override
    public List<PartyActivist> selectPartyActivistList(PartyActivist partyActivist)
    {
        return partyActivistMapper.selectPartyActivistList(partyActivist);
    }

    /**
     * 新增入党积极分子申请
     * 
     * @param partyActivist 入党积极分子申请
     * @return 结果
     */
    @Override
    public int insertPartyActivist(PartyActivist partyActivist)
    {
        partyActivist.setCreateTime(DateUtils.getNowDate());
        return partyActivistMapper.insertPartyActivist(partyActivist);
    }

    /**
     * 修改入党积极分子申请
     * 
     * @param partyActivist 入党积极分子申请
     * @return 结果
     */
    @Override
    public int updatePartyActivist(PartyActivist partyActivist)
    {
        partyActivist.setUpdateTime(DateUtils.getNowDate());
        return partyActivistMapper.updatePartyActivist(partyActivist);
    }

    /**
     * 批量删除入党积极分子申请
     * 
     * @param activistIds 需要删除的入党积极分子申请主键
     * @return 结果
     */
    @Override
    public int deletePartyActivistByActivistIds(Long[] activistIds)
    {
        return partyActivistMapper.deletePartyActivistByActivistIds(activistIds);
    }

    /**
     * 删除入党积极分子申请信息
     * 
     * @param activistId 入党积极分子申请主键
     * @return 结果
     */
    @Override
    public int deletePartyActivistByActivistId(Long activistId)
    {
        return partyActivistMapper.deletePartyActivistByActivistId(activistId);
    }
}
